/*
 * Copyright© 2003-2019 浙江汇信科技有限公司, All Rights Reserved.
 */
package com.icinfo.cloud.provider.punish.execute.service;

import com.icinfo.cloud.provider.punish.approval.dto.AuditDetailDocumentQueryDto;
import com.icinfo.cloud.provider.punish.approval.vo.AuditInfoChainLogTopVo;
import com.icinfo.cloud.provider.punish.approval.vo.AuditInfoChainLogVo;
import com.icinfo.cloud.provider.punish.csource.manage.model.CaseSourceDocumentRecord;
import com.icinfo.cloud.provider.punish.execute.dto.ExecuteDocumentRecordDelDto;
import com.icinfo.cloud.provider.punish.execute.dto.ExecuteDocumentRecordDto;
import com.icinfo.cloud.provider.punish.execute.dto.ExecuteStageLinkRelateDocumentQueryDto;
import com.icinfo.cloud.provider.punish.execute.model.ExecuteDocumentRecord;
import com.icinfo.cloud.provider.punish.execute.vo.ExecuteDocumentRecordVo;
import com.icinfo.cloud.provider.punish.execute.vo.ExecuteStageLinkRelateDocumentVo;
import com.icinfo.cloud.provider.punish.ucase.casemain.dto.CaseDocumentRecordDto;
import com.icinfo.framework.core.service.BaseService;

import java.text.ParseException;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

/**
 * 描述: 裁执分离文书记录表 execute_document_record 对应的Service接口.<br>
 *
 * @author framework generator
 * @date 2022年08月26日
 */
public interface IExecuteDocumentRecordService extends BaseService {
    /**
     * 查询裁执分离文书列表
     *
     * @param query
     * @return {@link List< ExecuteStageLinkRelateDocumentVo>}
     * @author wuzhihui
     * @date 2022/8/29
     */
    List<ExecuteStageLinkRelateDocumentVo> getExecuteStageLinkRelateDocumentInfo(ExecuteStageLinkRelateDocumentQueryDto query);

    /**
     * 查询裁执分离文书
     *
     * @param executeId
     * @param documentCatalogCode
     * @param s
     * @return {@link CaseSourceDocumentRecord}
     * @author wuzhihui
     * @date 2022/8/29
     */
    ExecuteDocumentRecord getExecuteDocumentRecord(String executeId, String documentCatalogCode, String s);

    /**
     * 描述：删除文书记录
     *
     * @param delDto 删除dto
     * @return int
     * @author wuzhihui
     * @date 2022/08/28
     */
    int delExecuteDocumentRecordInfo(ExecuteDocumentRecordDelDto delDto);


    /**
     * 描述: 裁执分离查询审批链头部信息
     *
     * @param auditDetailDocumentQueryDto
     * @return com.icinfo.framework.common.web.Result
     * @author zhanghongqiang
     * @Date 2022/9/7
     */
    AuditInfoChainLogTopVo getAuditChainTop(AuditDetailDocumentQueryDto auditDetailDocumentQueryDto);

    /**
     * 描述: 查询审批链日志
     *
     * @param auditDetailDocumentQueryDto
     * @return com.icinfo.framework.common.web.Result
     * @author zhanghongqiang
     * @Date 2022/9/7
     */
    List<AuditInfoChainLogVo> getAuditChain(AuditDetailDocumentQueryDto auditDetailDocumentQueryDto) throws ParseException;

    /**
     * 描述: 根据唯一标识查询文书记录信息
     *
     * @param documentId
     * @return com.icinfo.cloud.provider.punish.execute.vo.ExecuteDocumentRecordVo
     * @author zhanghongqiang
     * @Date 2022/9/13
     */
    ExecuteDocumentRecordVo getExecuteDocumentRecordInfo(String documentId);

    /**
     * 描述: 更新文书送达信息
     *
     * @param documentId
     * @param sentTime
     * @param sendStatus
     * @return void
     * @author zhanghongqiang
     * @Date 2022/9/13
     */
    void updateDocumentSentInfo(String documentId, LocalDateTime sentTime, String sendStatus);

    /**
     * 描述：计算送达截止日期
     *
     * @param executeId           裁执分离id
     * @param documentCatalogCode 文书目录编码
     * @param sendLimitDay        送达期限
     * @param sendLimitType       送达期限类型
     * @param isContainStartDay   是否包含开始日期
     * @return LocalDate 送达截止日期
     * @author wuzhihui
     * @date 2022-09-14 09:41
     */
    LocalDate calculateSentDeadLine(String executeId, String documentCatalogCode, Integer sendLimitDay, String sendLimitType, boolean isContainStartDay);
    /**
     * 描述：根据caseId和documentKindCode获取文书记录
     *
     * @param executeId           裁执分离id
     * @param documentKindCode 文件类型代码
     * @return {@link ExecuteDocumentRecordDto }
     * @author shishengyao
     * @date 2022/04/10
     */
    ExecuteDocumentRecordDto getExecuteDocumentRecordByKindCode(String executeId, String documentKindCode);


}